import 'package:flutter/material.dart';

class Myapp9 extends StatelessWidget {
  const Myapp9({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        //导航条
        appBar: AppBar(
          title: const Text('Row组件',
              style: TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.bold,
                  color: Colors.white)),
          backgroundColor: Colors.pink,
          centerTitle: true,
        ),
        //主题区域
        body: Center(
          child: Container(
              color: Colors.cyan,
              width: MediaQuery.of(context).size.width,
              height: 400,
              child: Row(
                //设置主轴对齐方式
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                //设置交叉轴对齐方式
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Image.network(
                    'https://yanxuan-item.nosdn.127.net/afd6199278a5b8fd783bc4947960fabc.jpg',
                    width: 100,
                    height: 100,
                  ),
                  Expanded(
                      child: const Text(
                    '茶水分离杯耐热隔热玻璃杯茶水分离杯耐热隔热玻璃杯 茶水分离杯耐热隔热玻璃杯',
                    style: TextStyle(fontSize: 20),
                  )),
                  const Icon(Icons.add),
                ],
              )),
        ));
  }
}
